{% extends "bets/base.html" %}
{% load i18n admin_static %}
{% load url from future %}

{% block content %}
<div style="height: 20px; margin-top:100px; margin-left: 523px;">
	{% if error_msg %}
		<p style="color: red;"><strong>{{ error_msg }}</strong></p>
	{% endif %}
</div>
<table style="height:100%;width:100%;">
	<tr>
		<td align="center">
			<div id="login_form">
				<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
				  <div class="form-row">
				    {% if not form.this_is_the_login_form.errors %}{{ form.username.errors }}{% endif %}
				    <label for="id_username" class="required">{% trans 'Username:' %}</label> {{ form.username }}
				  </div>
				  <div class="form-row">
				    {% if not form.this_is_the_login_form.errors %}{{ form.password.errors }}{% endif %}
				    <label for="id_password" class="required">{% trans 'Password:' %}</label> {{ form.password }}
				    <input type="hidden" name="this_is_the_login_form" value="1" />
				    <input type="hidden" name="next" value="{{ next }}" />
				  </div>
				  {% url 'admin_password_reset' as password_reset_url %}
				  {% if password_reset_url %}
				  <div class="password-reset-link">
				    <a href="{{ password_reset_url }}">{% trans 'Forgotten your password or username?' %}</a>
				  </div>
				  {% endif %}
				  <div class="submit-row">
				    <label>&nbsp;</label><input type="submit" value="{% trans 'Log in' %}" />
				  </div>
				</form>
				
				<div id="register_link" style="margin-top: 50px;">
					<a style="font-size: 18px" href="{% url 'bets:register_view' %}">{% trans 'Register' %}</a>
				</div>
				
			</div>
		</td>
	</tr>
</table>

{% endblock %}
